<div id="withdrawal2" class="subcontent1 margintop20 hide" style="display: block;">
    <div class="formpanel">
        <div class="wd-row">
            <div class="wd-col1">当前提款密码：</div>
            <div class="wd-col2">
                <input type="password" id="fundpwd" class="textfield1">
            </div>
            <div class="clear"></div>
        </div>
        <div class="wd-row">
            <div class="wd-col1">新提款密码：</div>
            <div class="wd-col2">
                <input type="password" id="newpwd" class="textfield1">
            </div>
            <div class="clear"></div>
        </div>
        <div class="wd-row">
            <div class="wd-col1">确认密码：</div>
            <div class="wd-col2">
                <input type="password" id="rednewpwd" class="textfield1">
            </div>
            <div class="clear"></div>
        </div>
        <div class="wd-row" style="text-align: center;">
            <input type="button" class="c-button" onclick="User.updateFundPwd();" value="提交">
        </div>
    </div>
</div>
<script>
    $("#withdrawal2 .c-button").click(function() {
        var p1 = $("#newpwd").val().trim();
        var p2 = $("#rednewpwd").val().trim();
        if (!p1) {
            alert2("请输入新的提款密码", true);
            return;
        }
        var patrn= /^[0-9]{4}$/; 
		if (!patrn.exec(p1)){
			 alert2('请设置4位的数字的提款密码', true);
			return;
		}
        if (p1 != p2) {
            alert2('两次输入的密码不一致，请重新输入', true);
            return;
        }

        var old = $("#fundpwd").val().trim();
        if (context.user.user.tpassword && context.user.user.tpassword != old) {
            alert2("当前提款密码错误", true);
            return;
        }

        startLoading();
        CMD.modify_user_info(undefined, {
            tpassword: p1,
        }, function() {
            stopLoading();
            alert2("修改提款密码成功");
        });
    })
</script>